home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Purity / Purity #22 (1994-01-19)(Diesel)(DE)[WB].zip / Purity #22 (1994-01-19)(Diesel)(DE)[WB].adf / MagicBlank / LINES.h < prev    next >
Text File  |  1994-01-17  |  870b  |  47 lines

  1. {$if not def MAGICBLANK_LINES_H}
  2.  
  3. CONST
  4.   MAGICBLANK_LINES_H = 2;
  5.  
  6. { ****************************************
  7.   * Malt bunte Linien auf den Bildschirm *
  8.   **************************************** }
  9. PROCEDURE Lines;
  10. VAR
  11.   dum : LongInt;
  12.   rp  : p_RastPort;
  13.   f,x,y,x1,y1   : Integer;
  14. BEGIN
  15.   rp:=^sp^.RastPort;
  16.   dum := 150; { 150 Linien malen }
  17.   sig1 := SetSignal(0,0) AND SBF_CF;
  18.   While sig1 = 0 Do
  19.   BEGIN
  20.     Dec(dum);
  21.     If dum<=0 then
  22.     BEGIN
  23.       SetRast(rp,0);
  24.       DisplayBeep(sp);
  25.       Exit;
  26.     END;
  27.     REPEAT
  28.       f:=Random(8);
  29.     UNTIL f IN [1..7];
  30.     SetAPen(rp,f);
  31.     x:=Random(sp^.Width);
  32.     y:=Random(sp^.Height);
  33.     x1:=Random(sp^.Width);
  34.     y1:=Random(sp^.Height);
  35.     Move(rp,x,y);
  36.     Draw(rp,x1,y1);
  37.     Delay(3);
  38.     SetAPen(rp,0);
  39.     Move(rp,x,y);
  40.     Draw(rp,x1,y1);
  41.     sig1 := SetSignal(0,0) AND SBF_CF;
  42.   END;
  43. END;
  44.  
  45. {$endif}
  46.  
  47.